main(n,r,i)
{
	for(gets(&n);~scanf("%d",&n);printf("%d\n",r))
		for(i=r=1;i<=n;r=r%i?i*r:r/i,i++);
}
